package com.mt.edu.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 类名称：Question <br>
 * 类描述： 试题<br>
 * 创建人： 马腾 <br>
 * 创建时间：Apr 28, 2014 9:13:55 PM <br>
 * 修改人： 马腾 <br>
 * 修改时间：Apr 28, 2014 9:13:55 PM <br>
 */
@Entity
@Table(name="OL_QUESTION")
public class Question implements Serializable {
	
	private static final long serialVersionUID = -4278813621377527168L;
	
	private String id;
	private Subject subject;
	private Grade grade;
	private Question parent;
	private Short level;
	private String sn;
	private String displaySn;
	private Category category;
	private String source;
	private Short status;
	private Integer timeLong;
	private Short type;
	private Short optionNum;
	private Short difficulty;
	private Integer scores;
	private String tag;
	private String desc;
	private String correctAnswer;
	private String answerAnalyze;
	private Boolean isLessHalf;
	private Boolean isMatchCase;
	private Boolean isMatchOrder;
	private Date createDt;
	private Date updateDt; 
	private String operator;
	
	@Id
	@Column(name = "QUESTION_ID")
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="SUBJECT_ID")
	public Subject getSubject() {
		return subject;
	}
	public void setSubject(Subject subject) {
		this.subject = subject;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="GRADE_ID")
	public Grade getGrade() {
		return grade;
	}
	public void setGrade(Grade grade) {
		this.grade = grade;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="PARENT_QUESTION_ID")
	public Question getParent() {
		return parent;
	}
	public void setParent(Question parent) {
		this.parent = parent;
	}
	
	@Column(name = "QUESTION_LEVEL")
	public Short getLevel() {
		return level;
	}
	public void setLevel(Short level) {
		this.level = level;
	}
	
	@Column(name = "QUESTION_SN")
	public String getSn() {
		return sn;
	}
	public void setSn(String sn) {
		this.sn = sn;
	}
	
	@Column(name = "QUESTION_DISPLAY_SN")
	public String getDisplaySn() {
		return displaySn;
	}
	public void setDisplaySn(String displaySn) {
		this.displaySn = displaySn;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="QUESTION_CATEGORY_ID")
	public Category getCategory() {
		return category;
	}
	public void setCategory(Category category) {
		this.category = category;
	}
	
	@Column(name = "QUESTION_SOURCE")
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
	
	@Column(name = "QUESTION_STATUS")
	public Short getStatus() {
		return status;
	}
	public void setStatus(Short status) {
		this.status = status;
	}
	
	@Column(name = "QUESTION_TIME_LONG")
	public Integer getTimeLong() {
		return timeLong;
	}
	public void setTimeLong(Integer timeLong) {
		this.timeLong = timeLong;
	}
	
	@Column(name = "QUESTION_TYPE")
	public Short getType() {
		return type;
	}
	public void setType(Short type) {
		this.type = type;
	}
	
	@Column(name = "QUESTION_OPTION_NUMS")
	public Short getOptionNum() {
		return optionNum;
	}
	public void setOptionNum(Short optionNum) {
		this.optionNum = optionNum;
	}
	
	@Column(name = "QUESTION_DIFFICULTY")
	public Short getDifficulty() {
		return difficulty;
	}
	public void setDifficulty(Short difficulty) {
		this.difficulty = difficulty;
	}
	
	@Column(name = "QUESTION_SCORES")
	public Integer getScores() {
		return scores;
	}
	public void setScores(Integer scores) {
		this.scores = scores;
	}
	
	@Column(name = "QUESTION_TAG")
	public String getTag() {
		return tag;
	}
	public void setTag(String tag) {
		this.tag = tag;
	}
	
	@Column(name = "QUESTION_DESC")
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	@Column(name = "QUESTION_CORRECT_ANSWER")
	public String getCorrectAnswer() {
		return correctAnswer;
	}
	public void setCorrectAnswer(String correctAnswer) {
		this.correctAnswer = correctAnswer;
	}
	
	@Column(name = "QUESTION_ANSWER_ANALYZE")
	public String getAnswerAnalyze() {
		return answerAnalyze;
	}
	public void setAnswerAnalyze(String answerAnalyze) {
		this.answerAnalyze = answerAnalyze;
	}
	
	@Column(name = "ANSWER_LESS_HALF")
	public Boolean getIsLessHalf() {
		return isLessHalf;
	}
	public void setIsLessHalf(Boolean isLessHalf) {
		this.isLessHalf = isLessHalf;
	}
	
	@Column(name = "ANSWER_MATCH_CASE")
	public Boolean getIsMatchCase() {
		return isMatchCase;
	}
	public void setIsMatchCase(Boolean isMatchCase) {
		this.isMatchCase = isMatchCase;
	}
	
	@Column(name = "ANSWER_MATCH_ORDER")
	public Boolean getIsMatchOrder() {
		return isMatchOrder;
	}
	public void setIsMatchOrder(Boolean isMatchOrder) {
		this.isMatchOrder = isMatchOrder;
	}
	
	@Column(name = "CREATE_DT")
	public Date getCreateDt() {
		return createDt;
	}
	public void setCreateDt(Date createDt) {
		this.createDt = createDt;
	}
	
	@Column(name = "UPDTE_DT")
	public Date getUpdateDt() {
		return updateDt;
	}
	public void setUpdateDt(Date updateDt) {
		this.updateDt = updateDt;
	}
	
	@Column(name = "OPERATOR")
	public String getOperator() {
		return operator;
	}
	public void setOperator(String operator) {
		this.operator = operator;
	}
}
